{% extends 'main.html' %}
{% block title %}{% endblock %}

{% block content %}

{%if user.is_authenticated %}



<div class="content-box"><!-- Start Content Box -->
				
				<div class="content-box-header">
					
					<h3>Keep your profile updated</h3>
					
					<ul class="content-box-tabs">
						<li><a href="#tab1" class="default-tab">{{user}} Profile</a></li>
						<li><a href="#tab2">Edit Profile</a></li> 
						<li><a href="/password/alterar">Change Password</a></li> 
					</ul>
					
					<div class="clear"></div>
					
				</div> <!-- End .content-box-header -->
				
				<div class="content-box-content">
					
					<div class="tab-content default-tab" id="tab1"> 
						
						
						{% for condomino in UserProfiles %}
								<h4>Authentication</h4><br>
								<h6>User: {{condomino.user}}</h6>
								<p></p><hr><p></p>
								<h4>Personal</h4><br>
								<h6>{{condomino.proprietario}}</h6><br>
								<h6>Taxpayer Identification Number (TIN): {{condomino.nif}}</h6><br>
								<h6>Address: {{condomino.morada}}</h6><br>
								<h6>Email: {{condomino.email}}</h6><br>
								<h6>Telephone: {{condomino.telefone}}</h6>
								
								
								{% endfor %}
								
						
						
					</div>


					
					<div class="tab-content" id="tab2"> 
						
						
						<form action="" method="post" accept-charset="utf-8">
          <table>
            {% csrf_token %}
            {{ form.as_table }}
            <br/>
          <tr>
            <td><input type="submit" value="Gravar"></td>
            <td><INPUT TYPE="button" VALUE="Cancelar" onClick="history.go(-1);return true;"> </td>
          </tr>
        </table>
      </form>
						
						
						
					</div> <!-- End #tab1 -->        
					
					
					
				</div> <!-- End .content-box-content -->
				
			</div> <!-- End .content-box -->









{% else %}


<h2>Welcome to Condominium Manager | Demo</h2>



<p>
Please click <a href="{% url django.contrib.auth.views.login %}">here to login</a>
</p>


{% endif %}
{% endblock %}
